<div class="refentry" lang="en" xml:lang="en"><a id="gluTessNormal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>gluTessNormal — specify a normal for a polygon</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">gluTessNormal</b>(</code></td><td>GLUtesselator*  </td><td><var class="pdparam">tess</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">valueX</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">valueY</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">valueZ</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>tess</code></em></span></dt><dd><p>
                    Specifies the tessellation object (created with <a class="citerefentry" href="gluNewTess"><span class="citerefentry"><span class="refentrytitle">gluNewTess</span></span></a>).
                </p></dd><dt><span class="term"><em class="parameter"><code>valueX</code></em></span></dt><dd><p>
                    Specifies the first component of the normal.
                </p></dd><dt><span class="term"><em class="parameter"><code>valueY</code></em></span></dt><dd><p>
                    Specifies the second component of the normal.
                </p></dd><dt><span class="term"><em class="parameter"><code>valueZ</code></em></span></dt><dd><p>
                    Specifies the third component of the normal.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">gluTessNormal</code> describes a normal for a polygon that the program is defining.
            All input data will be projected onto a plane perpendicular to one of
            the three coordinate axes before tessellation and all output triangles
            will be oriented CCW with
            respect to the normal (CW orientation can be obtained by reversing the
            sign of the supplied normal). For example, if you know that all polygons
            lie in the x-y plane, call <code class="function">gluTessNormal</code>(tess, 0.0, 0.0, 1.0)
            before rendering any polygons.
        </p><p>
            If the supplied normal is (0.0, 0.0, 0.0) (the initial value), the normal is
            determined as follows. The direction of the normal, up to its sign, is
            found by fitting a plane to the vertices, without regard to how the
            vertices are connected. It is expected that the input data lies approximately
            in the plane; otherwise, projection perpendicular to one of the three
            coordinate axes may substantially change the geometry. The sign of the
            normal is chosen so that the sum of the signed areas of all input
            contours is nonnegative (where a CCW contour has positive area).
        </p><p>
            The supplied normal persists until it is changed by another call to
            <code class="function">gluTessNormal</code>.
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="gluTessBeginPolygon"><span class="citerefentry"><span class="refentrytitle">gluTessBeginPolygon</span></span></a>,
            <a class="citerefentry" href="gluTessEndPolygon"><span class="citerefentry"><span class="refentrytitle">gluTessEndPolygon</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/" target="_top">https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
